package factoryModel.abstractFactoryModel.store;


import factoryModel.abstractFactoryModel.factory.AhPizzaIngredientFactory;
import factoryModel.abstractFactoryModel.factory.PizzaIngredientFactory;
import factoryModel.abstractFactoryModel.pizza.AhPizza;
import factoryModel.abstractFactoryModel.pizza.Pizza;
import factoryModel.factoryMethod.AHPizza;

/**
 * @author 帅小伙
 * @date 2021/12/29
 * @description
 */
public class FuYanPizzaStore extends PizzaStore {

    @Override
    public Pizza createPizza(String type) {
        Pizza pizza = null;
        PizzaIngredientFactory ingredientFactory = new AhPizzaIngredientFactory();
        if ("ah".equals(type)) {
            pizza = new AhPizza(ingredientFactory);
            pizza.setName("ah");
        }
        return pizza;
    }
}
